<?
	$params[sid] = $sid;
	$params[action] = "editMenu";
	$url = "$baseURL/$webDIR/?".encode_params($params);
	$data = get_interface_settings($id);
        if(is_array($data))
                while(list($k,$v) = each($data)){
                        $$k = $v;
                }
	$b = explode("|",$menuItemLink1);$menuItemLink1 = addslashes($b[0]); $sel[1][$b[1]] = "selected";
	$b = explode("|",$menuItemLink2);$menuItemLink2 = addslashes($b[0]); $sel[2][$b[1]] = "selected";
	$b = explode("|",$menuItemLink3);$menuItemLink3 = addslashes($b[0]); $sel[3][$b[1]] = "selected";

        if($okMsg) {
        include ('okMsg.html');
        }
        if($errorMsg) {
        include ('errorMsg.html');
        }
        else {
        }
				
?> 
<table width="100%">
  <tr> 
    <td colspan=2><font class="text"><b><?=translate('edit_links');?></b><br>
      <br>
      <?=translate('edit_links_desc');?></font></td>
  </tr>
</table>
<br>
<TABLE border=1 class='bTable' cellspacing='0'>
  <form action='<?=$url;?>' method='POST'>
	<TR>
		<TH colspan='2'><?=translate('menu');?></TH>
	</TR>
	<TR>
		 <td><?=translate('link1');?> </td>
		<TD>
			<table width='100%'  cellspacing='0'>
				<tr>
					
            				<td><?=translate('title');?>:</td>
					<td><input type='text' name='menuItem1' value='<?=$menuItem1;?>'></td>
				</tr>
				<tr>	
			            	<td><?=translate('linked_to');?>:</td>
			              	<td><input type='text' name='menuItemLink1' value='<?=$menuItemLink1;?>'></td>
				</tr>
			        <TR>
					<td><?=translate('open_in');?>:</td>
			                <TD  align='right'>
						<select name='t1'>
							<option <?=$sel[1][_blank];?> value='_blank'><?=translate('new_window');?> ( _blank ) </option>
							<option <?=$sel[1][_top];?> value='_top'><?=translate('same_window');?> ( _top ) </option>
							<option <?=$sel[1][_self];?> value='_self'><?=translate('same_frame');?> ( _self ) </option>
							<option <?=$sel[1][_parent];?> value='_parent'><?=translate('parent_frame');?> ( _parent  ) </option>
						 </select>
			                </TD>
			        </TR>
			</table>
		</TD>
	</TR>
        <TR>
                 <td><?=translate('link2');?></td>
                <TD>
                        <table width='100%'  cellspacing='0'>
                                <tr>

                                        <td><?=translate('title');?>:</td>
                                        <td><input type='text' name='menuItem2' value='<?=$menuItem2;?>'></td>
                                </tr>
                                <tr>
                                        <td><?=translate('linked_to');?>:</td>
                                        <td><input type='text' name='menuItemLink2' value='<?=$menuItemLink2;?>'></td>
                                </tr>
                                <TR>
                                        <td><?=translate('open_in');?>:</td>
                                        <TD  align='right'>
                                                <select name='t2'>
                                                        <option <?=$sel[2][_blank];?> value='_blank'><?=translate('new_window');?> ( _blank ) </option>
                                                        <option <?=$sel[2][_top];?> value='_top'><?=translate('same_window');?> ( _top ) </option>
                                                        <option <?=$sel[2][_self];?> value='_self'><?=translate('same_frame');?> ( _self ) </option>
                                                        <option <?=$sel[2][_parent];?> value='_parent'><?=translate('parent_frame');?> ( _parent  ) </option>
                                                 </select>
                                        </TD>
                                </TR>
                        </table>
                </TD>
        </TR>
        <TR>
                 <td><?=translate('link3');?></td>
                <TD>
                        <table width='100%'  cellspacing='0'>
                                <tr>

                                        <td><?=translate('title');?>:</td>
                                        <td><input type='text' name='menuItem3' value='<?=$menuItem3;?>'></td>
                                </tr>
                                <tr>
                                        <td><?=translate('linked_to');?>:</td>
                                        <td><input type='text' name='menuItemLink3' value='<?=$menuItemLink3;?>'></td>
                                </tr>
                                <TR>
                                        <td><?=translate('open_in');?>:</td>
                                        <TD  align='right'>
                                                <select name='t3'>
                                                        <option <?=$sel[3][_blank];?> value='_blank'><?=translate('new_window');?> ( _blank ) </option>
                                                        <option <?=$sel[3][_top];?> value='_top'><?=translate('same_window');?> ( _top ) </option>
                                                        <option <?=$sel[3][_self];?> value='_self'><?=translate('same_frame');?> ( _self ) </option>
                                                        <option <?=$sel[3][_parent];?> value='_parent'><?=translate('parent_frame');?> ( _parent  ) </option>
                                                 </select>
                                        </TD>
                                </TR>
                        </table>
                </TD>
        </TR>

	<TR>
		<TD  align='center'  colspan='2'>
			<input type='submit' value='<?=translate('submit');?>'>
		</TD>
	</TR>
</form>
</TABLE>
